import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { PlanPage } from '../plan/planPage';
import { WishPage } from '../wish/wishPage';
import { HabitService } from '../../service/habit.service';
@Component({
  selector: 'page-home',
  templateUrl: 'habit.html'
})
export class HabitPage {

  constructor(public navCtrl: NavController, public habitService: HabitService) {

  }
  enterPlanPage(){
    this.habitService.getPlan().then(planList=>{
      this.habitService.planList=planList;
      this.navCtrl.push(PlanPage);
    });
  }
  enterWishPage(){
    this.navCtrl.push(WishPage)
  }

}
